<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>blmc_drivers: blmc_drivers::SafeMotor Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">blmc_drivers
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classblmc__drivers_1_1SafeMotor.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classblmc__drivers_1_1SafeMotor-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">blmc_drivers::SafeMotor Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>This class is a safe implementation of the <a class="el" href="classblmc__drivers_1_1Motor.html" title="This class implements the MotorInterface. ">Motor</a> class.  
 <a href="classblmc__drivers_1_1SafeMotor.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="motor_8hpp_source.html">motor.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for blmc_drivers::SafeMotor:</div>
<div class="dyncontent">
<div class="center"><img src="classblmc__drivers_1_1SafeMotor__inherit__graph.png" border="0" usemap="#blmc__drivers_1_1SafeMotor_inherit__map" alt="Inheritance graph"/></div>
<map name="blmc__drivers_1_1SafeMotor_inherit__map" id="blmc__drivers_1_1SafeMotor_inherit__map">
<area shape="rect" id="node2" href="classblmc__drivers_1_1Motor.html" title="This class implements the MotorInterface. " alt="" coords="35,155,172,181"/>
<area shape="rect" id="node3" href="classblmc__drivers_1_1MotorInterface.html" title="This class declares an interface to the motor. " alt="" coords="9,80,197,107"/>
<area shape="rect" id="node4" href="classblmc__drivers_1_1DeviceInterface.html" title="this class exists purely for logical reasons, it does not in itself implement anything. " alt="" coords="5,5,201,32"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for blmc_drivers::SafeMotor:</div>
<div class="dyncontent">
<div class="center"><img src="classblmc__drivers_1_1SafeMotor__coll__graph.png" border="0" usemap="#blmc__drivers_1_1SafeMotor_coll__map" alt="Collaboration graph"/></div>
<map name="blmc__drivers_1_1SafeMotor_coll__map" id="blmc__drivers_1_1SafeMotor_coll__map">
<area shape="rect" id="node2" href="classblmc__drivers_1_1Motor.html" title="This class implements the MotorInterface. " alt="" coords="35,155,172,181"/>
<area shape="rect" id="node3" href="classblmc__drivers_1_1MotorInterface.html" title="This class declares an interface to the motor. " alt="" coords="9,80,197,107"/>
<area shape="rect" id="node4" href="classblmc__drivers_1_1DeviceInterface.html" title="this class exists purely for logical reasons, it does not in itself implement anything. " alt="" coords="5,5,201,32"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a6e9cda054c161d28f062955d97e73f82"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__drivers_1_1SafeMotor.html#a6e9cda054c161d28f062955d97e73f82">SafeMotor</a> (<a class="el" href="classblmc__drivers_1_1MotorInterface.html#ae31f230b9da3674a05543023c90b124c">Ptr</a>&lt; <a class="el" href="classblmc__drivers_1_1MotorBoardInterface.html">MotorBoardInterface</a> &gt; board, bool motor_id, const double &amp;max_current_target=2.0, const size_t &amp;history_length=1000, const double &amp;max_velocity=std::numeric_limits&lt; double &gt;::quiet_NaN())</td></tr>
<tr class="memdesc:a6e9cda054c161d28f062955d97e73f82"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a new <a class="el" href="classblmc__drivers_1_1SafeMotor.html" title="This class is a safe implementation of the Motor class. ">SafeMotor</a> object.  <a href="#a6e9cda054c161d28f062955d97e73f82">More...</a><br /></td></tr>
<tr class="separator:a6e9cda054c161d28f062955d97e73f82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c938b6289e41a7d3ab8a19a045382e0"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classblmc__drivers_1_1MotorInterface.html#ae31f230b9da3674a05543023c90b124c">Ptr</a>&lt; const <a class="el" href="classblmc__drivers_1_1MotorInterface.html#a49b8fc916b9f9debbd7b0988463db5cd">ScalarTimeseries</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__drivers_1_1SafeMotor.html#a2c938b6289e41a7d3ab8a19a045382e0">get_current_target</a> () const </td></tr>
<tr class="memdesc:a2c938b6289e41a7d3ab8a19a045382e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Getters.  <a href="#a2c938b6289e41a7d3ab8a19a045382e0">More...</a><br /></td></tr>
<tr class="separator:a2c938b6289e41a7d3ab8a19a045382e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adedaee24408b94b3d1ed8f856e218b12"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__drivers_1_1SafeMotor.html#adedaee24408b94b3d1ed8f856e218b12">set_current_target</a> (const double &amp;current_target)</td></tr>
<tr class="memdesc:adedaee24408b94b3d1ed8f856e218b12"><td class="mdescLeft">&#160;</td><td class="mdescRight">Setters.  <a href="#adedaee24408b94b3d1ed8f856e218b12">More...</a><br /></td></tr>
<tr class="separator:adedaee24408b94b3d1ed8f856e218b12"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4f4bb531e2a9e7f965b319afb53d43c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__drivers_1_1SafeMotor.html#ad4f4bb531e2a9e7f965b319afb53d43c">set_max_current</a> (double max_current_target)</td></tr>
<tr class="memdesc:ad4f4bb531e2a9e7f965b319afb53d43c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the max_current_target_ object.  <a href="#ad4f4bb531e2a9e7f965b319afb53d43c">More...</a><br /></td></tr>
<tr class="separator:ad4f4bb531e2a9e7f965b319afb53d43c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa0083a39d815d7b3cd38c680bfea48a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__drivers_1_1SafeMotor.html#aaa0083a39d815d7b3cd38c680bfea48a">set_max_velocity</a> (double max_velocity)</td></tr>
<tr class="memdesc:aaa0083a39d815d7b3cd38c680bfea48a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the max_velocity_ constant.  <a href="#aaa0083a39d815d7b3cd38c680bfea48a">More...</a><br /></td></tr>
<tr class="separator:aaa0083a39d815d7b3cd38c680bfea48a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classblmc__drivers_1_1Motor"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classblmc__drivers_1_1Motor')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classblmc__drivers_1_1Motor.html">blmc_drivers::Motor</a></td></tr>
<tr class="memitem:a923be3c8e5027cdead1006f3878b6ec3 inherit pub_methods_classblmc__drivers_1_1Motor"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__drivers_1_1Motor.html#a923be3c8e5027cdead1006f3878b6ec3">Motor</a> (<a class="el" href="classblmc__drivers_1_1MotorInterface.html#ae31f230b9da3674a05543023c90b124c">Ptr</a>&lt; <a class="el" href="classblmc__drivers_1_1MotorBoardInterface.html">MotorBoardInterface</a> &gt; board, bool motor_id)</td></tr>
<tr class="memdesc:a923be3c8e5027cdead1006f3878b6ec3 inherit pub_methods_classblmc__drivers_1_1Motor"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a new <a class="el" href="classblmc__drivers_1_1Motor.html" title="This class implements the MotorInterface. ">Motor</a> object.  <a href="#a923be3c8e5027cdead1006f3878b6ec3">More...</a><br /></td></tr>
<tr class="separator:a923be3c8e5027cdead1006f3878b6ec3 inherit pub_methods_classblmc__drivers_1_1Motor"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad93b64d54b40ff12df7081e009c71239 inherit pub_methods_classblmc__drivers_1_1Motor"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__drivers_1_1Motor.html#ad93b64d54b40ff12df7081e009c71239">~Motor</a> ()</td></tr>
<tr class="memdesc:ad93b64d54b40ff12df7081e009c71239 inherit pub_methods_classblmc__drivers_1_1Motor"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy the <a class="el" href="classblmc__drivers_1_1Motor.html" title="This class implements the MotorInterface. ">Motor</a> object.  <a href="#ad93b64d54b40ff12df7081e009c71239">More...</a><br /></td></tr>
<tr class="separator:ad93b64d54b40ff12df7081e009c71239 inherit pub_methods_classblmc__drivers_1_1Motor"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acf7389e09918c1955986a641efd4f032 inherit pub_methods_classblmc__drivers_1_1Motor"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acf7389e09918c1955986a641efd4f032"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__drivers_1_1Motor.html#acf7389e09918c1955986a641efd4f032">send_if_input_changed</a> ()</td></tr>
<tr class="memdesc:acf7389e09918c1955986a641efd4f032 inherit pub_methods_classblmc__drivers_1_1Motor"><td class="mdescLeft">&#160;</td><td class="mdescRight">Actually send the command and controls via the network, See <a class="el" href="classblmc__drivers_1_1MotorInterface.html" title="This class declares an interface to the motor. ">MotorInterface</a> for more information. <br /></td></tr>
<tr class="separator:acf7389e09918c1955986a641efd4f032 inherit pub_methods_classblmc__drivers_1_1Motor"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a919cb2f48cfc8550fabd5d3c5d7d0cf0 inherit pub_methods_classblmc__drivers_1_1Motor"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classblmc__drivers_1_1MotorInterface.html#ae31f230b9da3674a05543023c90b124c">Ptr</a>&lt; const <a class="el" href="classblmc__drivers_1_1MotorInterface.html#a49b8fc916b9f9debbd7b0988463db5cd">ScalarTimeseries</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__drivers_1_1Motor.html#a919cb2f48cfc8550fabd5d3c5d7d0cf0">get_measurement</a> (const int &amp;index=0) const </td></tr>
<tr class="memdesc:a919cb2f48cfc8550fabd5d3c5d7d0cf0 inherit pub_methods_classblmc__drivers_1_1Motor"><td class="mdescLeft">&#160;</td><td class="mdescRight">Getters.  <a href="#a919cb2f48cfc8550fabd5d3c5d7d0cf0">More...</a><br /></td></tr>
<tr class="separator:a919cb2f48cfc8550fabd5d3c5d7d0cf0 inherit pub_methods_classblmc__drivers_1_1Motor"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa629114982c99453b4563a0ec06b9eea inherit pub_methods_classblmc__drivers_1_1Motor"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classblmc__drivers_1_1MotorInterface.html#ae31f230b9da3674a05543023c90b124c">Ptr</a>&lt; const <a class="el" href="classblmc__drivers_1_1MotorInterface.html#a49b8fc916b9f9debbd7b0988463db5cd">ScalarTimeseries</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__drivers_1_1Motor.html#aa629114982c99453b4563a0ec06b9eea">get_sent_current_target</a> () const </td></tr>
<tr class="memdesc:aa629114982c99453b4563a0ec06b9eea inherit pub_methods_classblmc__drivers_1_1Motor"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the already sent current target values.  <a href="#aa629114982c99453b4563a0ec06b9eea">More...</a><br /></td></tr>
<tr class="separator:aa629114982c99453b4563a0ec06b9eea inherit pub_methods_classblmc__drivers_1_1Motor"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4af56df5466d011fc2a567dd815a6c1b inherit pub_methods_classblmc__drivers_1_1Motor"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__drivers_1_1Motor.html#a4af56df5466d011fc2a567dd815a6c1b">set_command</a> (const <a class="el" href="classblmc__drivers_1_1MotorBoardCommand.html">MotorBoardCommand</a> &amp;command)</td></tr>
<tr class="memdesc:a4af56df5466d011fc2a567dd815a6c1b inherit pub_methods_classblmc__drivers_1_1Motor"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the command.  <a href="#a4af56df5466d011fc2a567dd815a6c1b">More...</a><br /></td></tr>
<tr class="separator:a4af56df5466d011fc2a567dd815a6c1b inherit pub_methods_classblmc__drivers_1_1Motor"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classblmc__drivers_1_1MotorInterface"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classblmc__drivers_1_1MotorInterface')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classblmc__drivers_1_1MotorInterface.html">blmc_drivers::MotorInterface</a></td></tr>
<tr class="memitem:a1f535a7de62ae8246f44541216254da5 inherit pub_methods_classblmc__drivers_1_1MotorInterface"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1f535a7de62ae8246f44541216254da5"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__drivers_1_1MotorInterface.html#a1f535a7de62ae8246f44541216254da5">~MotorInterface</a> ()</td></tr>
<tr class="memdesc:a1f535a7de62ae8246f44541216254da5 inherit pub_methods_classblmc__drivers_1_1MotorInterface"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy the <a class="el" href="classblmc__drivers_1_1MotorInterface.html" title="This class declares an interface to the motor. ">MotorInterface</a> object. <br /></td></tr>
<tr class="separator:a1f535a7de62ae8246f44541216254da5 inherit pub_methods_classblmc__drivers_1_1MotorInterface"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_types_classblmc__drivers_1_1MotorInterface"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classblmc__drivers_1_1MotorInterface')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classblmc__drivers_1_1MotorInterface.html">blmc_drivers::MotorInterface</a></td></tr>
<tr class="memitem:a35c1217dd295078c67bacc2cba08ab33 inherit pub_types_classblmc__drivers_1_1MotorInterface"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a35c1217dd295078c67bacc2cba08ab33"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__drivers_1_1MotorInterface.html#a35c1217dd295078c67bacc2cba08ab33">MeasurementIndex</a> { <br />
&#160;&#160;<b>current</b>, 
<b>position</b>, 
<b>velocity</b>, 
<b>encoder_index</b>, 
<br />
&#160;&#160;<b>measurement_count</b>
<br />
 }<tr class="memdesc:a35c1217dd295078c67bacc2cba08ab33"><td class="mdescLeft">&#160;</td><td class="mdescRight">Here is a list of the different measurement available on the blmc card. <br /></td></tr>
</td></tr>
<tr class="separator:a35c1217dd295078c67bacc2cba08ab33 inherit pub_types_classblmc__drivers_1_1MotorInterface"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49b8fc916b9f9debbd7b0988463db5cd inherit pub_types_classblmc__drivers_1_1MotorInterface"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a49b8fc916b9f9debbd7b0988463db5cd"></a>
typedef real_time_tools::ThreadsafeTimeseries&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__drivers_1_1MotorInterface.html#a49b8fc916b9f9debbd7b0988463db5cd">ScalarTimeseries</a></td></tr>
<tr class="memdesc:a49b8fc916b9f9debbd7b0988463db5cd inherit pub_types_classblmc__drivers_1_1MotorInterface"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is a useful alias. <br /></td></tr>
<tr class="separator:a49b8fc916b9f9debbd7b0988463db5cd inherit pub_types_classblmc__drivers_1_1MotorInterface"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae31f230b9da3674a05543023c90b124c inherit pub_types_classblmc__drivers_1_1MotorInterface"><td class="memTemplParams" colspan="2">template&lt;typename Type &gt; </td></tr>
<tr class="memitem:ae31f230b9da3674a05543023c90b124c inherit pub_types_classblmc__drivers_1_1MotorInterface"><td class="memTemplItemLeft" align="right" valign="top">using&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classblmc__drivers_1_1MotorInterface.html#ae31f230b9da3674a05543023c90b124c">Ptr</a> = std::shared_ptr&lt; Type &gt;</td></tr>
<tr class="memdesc:ae31f230b9da3674a05543023c90b124c inherit pub_types_classblmc__drivers_1_1MotorInterface"><td class="mdescLeft">&#160;</td><td class="mdescRight">This a useful alias for the shared Pointer creation.  <a href="#ae31f230b9da3674a05543023c90b124c">More...</a><br /></td></tr>
<tr class="separator:ae31f230b9da3674a05543023c90b124c inherit pub_types_classblmc__drivers_1_1MotorInterface"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_attribs_classblmc__drivers_1_1Motor"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classblmc__drivers_1_1Motor')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="classblmc__drivers_1_1Motor.html">blmc_drivers::Motor</a></td></tr>
<tr class="memitem:a779365c022edb7d4beb4060dcdb7dd72 inherit pro_attribs_classblmc__drivers_1_1Motor"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a779365c022edb7d4beb4060dcdb7dd72"></a>
<a class="el" href="classblmc__drivers_1_1MotorInterface.html#ae31f230b9da3674a05543023c90b124c">Ptr</a>&lt; <a class="el" href="classblmc__drivers_1_1MotorBoardInterface.html">MotorBoardInterface</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__drivers_1_1Motor.html#a779365c022edb7d4beb4060dcdb7dd72">board_</a></td></tr>
<tr class="memdesc:a779365c022edb7d4beb4060dcdb7dd72 inherit pro_attribs_classblmc__drivers_1_1Motor"><td class="mdescLeft">&#160;</td><td class="mdescRight">The MotorBoard to be used for the communication. <br /></td></tr>
<tr class="separator:a779365c022edb7d4beb4060dcdb7dd72 inherit pro_attribs_classblmc__drivers_1_1Motor"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a614903579bd6001169d11b72bc17042b inherit pro_attribs_classblmc__drivers_1_1Motor"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a614903579bd6001169d11b72bc17042b"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblmc__drivers_1_1Motor.html#a614903579bd6001169d11b72bc17042b">motor_id_</a></td></tr>
<tr class="memdesc:a614903579bd6001169d11b72bc17042b inherit pro_attribs_classblmc__drivers_1_1Motor"><td class="mdescLeft">&#160;</td><td class="mdescRight">The id of the motor on the MotorBoard. <br /></td></tr>
<tr class="separator:a614903579bd6001169d11b72bc17042b inherit pro_attribs_classblmc__drivers_1_1Motor"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>This class is a safe implementation of the <a class="el" href="classblmc__drivers_1_1Motor.html" title="This class implements the MotorInterface. ">Motor</a> class. </p>
<p>It contains utilities to bound the control input. It could also contains some velocity limits at the motor level and why not some temperature management.</p>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000001">Todo:</a></b></dt><dd>the velocity limit should be implemented in a smoother way, and the parameters should be passed in the constructor. </dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a6e9cda054c161d28f062955d97e73f82"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">blmc_drivers::SafeMotor::SafeMotor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classblmc__drivers_1_1MotorInterface.html#ae31f230b9da3674a05543023c90b124c">Motor::Ptr</a>&lt; <a class="el" href="classblmc__drivers_1_1MotorBoardInterface.html">MotorBoardInterface</a> &gt;&#160;</td>
          <td class="paramname"><em>board</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>motor_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const double &amp;&#160;</td>
          <td class="paramname"><em>max_current_target</em> = <code>2.0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const size_t &amp;&#160;</td>
          <td class="paramname"><em>history_length</em> = <code>1000</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const double &amp;&#160;</td>
          <td class="paramname"><em>max_velocity</em> = <code>std::numeric_limits&lt;&#160;double&gt;::quiet_NaN()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Construct a new <a class="el" href="classblmc__drivers_1_1SafeMotor.html" title="This class is a safe implementation of the Motor class. ">SafeMotor</a> object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">board</td><td></td></tr>
    <tr><td class="paramname">motor_id</td><td></td></tr>
    <tr><td class="paramname">max_current_target</td><td></td></tr>
    <tr><td class="paramname">history_length</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a2c938b6289e41a7d3ab8a19a045382e0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classblmc__drivers_1_1MotorInterface.html#ae31f230b9da3674a05543023c90b124c">Ptr</a>&lt;const <a class="el" href="classblmc__drivers_1_1MotorInterface.html#a49b8fc916b9f9debbd7b0988463db5cd">ScalarTimeseries</a>&gt; blmc_drivers::SafeMotor::get_current_target </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Getters. </p>
<p>Get the _current_target object</p>
<dl class="section return"><dt>Returns</dt><dd>Ptr&lt;const ScalarTimeseries&gt; </dd></dl>

<p>Reimplemented from <a class="el" href="classblmc__drivers_1_1Motor.html#ac1c0c4f1faa125bc0b245fdbe2590575">blmc_drivers::Motor</a>.</p>

</div>
</div>
<a class="anchor" id="adedaee24408b94b3d1ed8f856e218b12"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void blmc_drivers::SafeMotor::set_current_target </td>
          <td>(</td>
          <td class="paramtype">const double &amp;&#160;</td>
          <td class="paramname"><em>current_target</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Setters. </p>
<p>Set the current target (Ampere)</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">current_target</td><td></td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented from <a class="el" href="classblmc__drivers_1_1Motor.html#a48801c9858a7b1784b0a0ac4272fdaf5">blmc_drivers::Motor</a>.</p>

</div>
</div>
<a class="anchor" id="ad4f4bb531e2a9e7f965b319afb53d43c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void blmc_drivers::SafeMotor::set_max_current </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>max_current_target</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the max_current_target_ object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">max_current_target</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aaa0083a39d815d7b3cd38c680bfea48a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void blmc_drivers::SafeMotor::set_max_velocity </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>max_velocity</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the max_velocity_ constant. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">max_velocity</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/workspace/software/workspace/src/catkin/hardware/blmc_drivers/include/blmc_drivers/devices/<a class="el" href="motor_8hpp_source.html">motor.hpp</a></li>
<li>/workspace/software/workspace/src/catkin/hardware/blmc_drivers/src/<a class="el" href="motor_8cpp.html">motor.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespaceblmc__drivers.html">blmc_drivers</a></li><li class="navelem"><a class="el" href="classblmc__drivers_1_1SafeMotor.html">SafeMotor</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
